package main

import (
	"fmt"
	"strings"

	"github.com/xuender/oil/str"
)

func q1() {
	fmt.Println("start")
	vars := [][][]string{
		{{"爸爸", "李渊", "李世民"}},
		{{"爸爸", "李世民", "李承乾"}},
		{{"爸爸", "李世民", "李治"}},
		{{"爷爷", "_X", "_Y"},
			{"爸爸", "_X", "_Z"},
			{"爸爸", "_Z", "_Y"}},
	}
	q := [][]string{
		{"爷爷", "_A", "_B"},
	}
	fmt.Println(vars)
	fmt.Println(q)
	s := str.NewStack()
	for _, a := range q {
		for _, b := range a {
			if strings.HasPrefix(b, "_") {
				s.Push(b)
			}
		}
	}
	fmt.Println(s)
}
func main() {
	q1()
}
